package com.zzx.auth.biz;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zzx.auth.mapper.SysRoleMapper;
import com.zzx.auth.model.SysRole;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Set;

/**
 * 用户权限仓储层
 */
@Service
public class SysRoleBiz extends ServiceImpl<SysRoleMapper, SysRole> {

    @Autowired
    private SysRoleMapper sysRoleMapper;

    /**
     * 获取权限
     *
     * @param userName 用户名
     * @return 权限表单
     */
    public Set<String> selectRoleKeysByUserName(String userName) {
        return sysRoleMapper.selectRoleKeysByUserName(userName);
    }
}
